From 8e2fe628727a4f0529b256eae302c07d1e9effff Mon Sep 17 00:00:00 2001 From: Alex Williamson Date: Tue, 20 Nov 2007 09:14:43 -0700 Subject: [PATCH] [IA64] vti save-restore: preparation opt_feature support Pass struct domain* to domain_opt_feature(). This patch is preparation patch for HVM domain save/restore opt_feature. Signed-off-by: Isaku Yamahata --- xen/arch/ia64/vmx/mmio.c | 4 ++-- xen/arch/ia64/xen/domain.c | 3 +-- xen/arch/ia64/xen/hypercall.c | 2 +- xen/include/asm-ia64/domain.h | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/xen/arch/ia64/vmx/mmio.c b/xen/arch/ia64/vmx/mmio.c index 107bcdfdf3..0c0b49c503 100644 --- a/xen/arch/ia64/vmx/mmio.c +++ b/xen/arch/ia64/vmx/mmio.c @@ -252,11 +252,11 @@ static inline void set_os_type(VCPU *v, u64 type) optf.on = XEN_IA64_OPTF_ON; optf.pgprot = (_PAGE_P|_PAGE_A|_PAGE_D|_PAGE_MA_WB|_PAGE_AR_RW); optf.key = 0; - domain_opt_feature(&optf); + domain_opt_feature(v->domain, &optf); optf.cmd = XEN_IA64_OPTF_IDENT_MAP_REG5; optf.pgprot = (_PAGE_P|_PAGE_A|_PAGE_D|_PAGE_MA_UC|_PAGE_AR_RW); - domain_opt_feature(&optf); + domain_opt_feature(v->domain, &optf); } } } diff --git a/xen/arch/ia64/xen/domain.c b/xen/arch/ia64/xen/domain.c index d951cca218..ab9363c80a 100644 --- a/xen/arch/ia64/xen/domain.c +++ b/xen/arch/ia64/xen/domain.c @@ -2290,9 +2290,8 @@ optf_set_identity_mapping(unsigned long* mask, struct identity_mapping* im, * The vcpu must be paused to avoid racy access to opt_feature. */ int -domain_opt_feature(struct xen_ia64_opt_feature* f) +domain_opt_feature(struct domain *d, struct xen_ia64_opt_feature* f) { - struct domain *d = current->domain; struct opt_feature* optf = &d->arch.opt_feature; struct vcpu *v; long rc = 0; diff --git a/xen/arch/ia64/xen/hypercall.c b/xen/arch/ia64/xen/hypercall.c index cf80c54457..5c97f3bb7e 100644 --- a/xen/arch/ia64/xen/hypercall.c +++ b/xen/arch/ia64/xen/hypercall.c @@ -229,7 +229,7 @@ ia64_hypercall(struct pt_regs *regs) struct xen_ia64_opt_feature optf; set_xen_guest_handle(arg, (void*)(vcpu_get_gr(v, 32))); if (copy_from_guest(&optf, arg, 1) == 0) - regs->r8 = domain_opt_feature(&optf); + regs->r8 = domain_opt_feature(v->domain, &optf); else regs->r8 = -EFAULT; break; diff --git a/xen/include/asm-ia64/domain.h b/xen/include/asm-ia64/domain.h index 486696d679..1cdb8404ed 100644 --- a/xen/include/asm-ia64/domain.h +++ b/xen/include/asm-ia64/domain.h @@ -116,7 +116,7 @@ struct opt_feature { (1UL << XEN_IA64_OPTF_IDENT_MAP_REG5_BIT) /* Set an optimization feature in the struct arch_domain. */ -extern int domain_opt_feature(struct xen_ia64_opt_feature*); +extern int domain_opt_feature(struct domain *, struct xen_ia64_opt_feature*); struct arch_domain { struct mm_struct mm; -- 2.30.2